package chapter02;

public class Example29 {
    public static void main(String[] args) {
        int[] arr = {4,1,6,3,9,8};
        int min = getMin(arr);
        System.out.println("min = " + min);
    }
    static int getMin(int[] arr){
        int min = arr[0];
        for (int x = 0;x < arr.length;x++){
            if (arr[x] < min){
                min = arr[x];
            }
        }
        return min;
    }
}
